package com.fortune.rainshine.feign.service;

import com.fortune.rainshine.config.FeignConfig;
import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.base.ParmsModel;
import com.fortune.rainshinecommon.model.service.StockRecordsModel;
import com.fortune.rainshinecommon.query.GetDetailQuery;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "rain-shine-service",configuration = FeignConfig.class)
@Controller
public interface ProductSaleFeign {
    @PostMapping(value = "/productSale/saleOrUse")
    MsgModel saleOrUse(@RequestBody StockRecordsModel model);

    @PostMapping(value = "/productSale/list")
    MsgModel list(@RequestBody ParmsModel parm);

    @PostMapping(value = "/productSale/consumeDetails")
    @ResponseBody
    MsgModel consumeDetails(@RequestBody GetDetailQuery query);

    @PostMapping(value = "/productSale/saleDetails")
    @ResponseBody
    MsgModel saleDetails(@RequestBody GetDetailQuery query);
}
